package org.springblade.app.feign.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * @author zhangyr
 * @version 1.0
 * @date 2022-09-28 18:16
 * @description
 */
@Data
@TableName("shy_app_menu")
@ApiModel(value = "AppMenu对象", description = "菜单表")
public class SubAppMenuEntity implements Serializable {

	private static final long serialVersionUID = 1L;

	@JsonSerialize(
		using = ToStringSerializer.class
	)
	@ApiModelProperty("主键id")
	@TableId(
		value = "id",
		type = IdType.ASSIGN_ID
	)
	private Long id;

	/**
	 * 父级菜单
	 */
	@ApiModelProperty(value = "父级菜单")
	@JsonSerialize(
		using = ToStringSerializer.class
	)
	private Long parentId;
	/**
	 * 菜单编号
	 */
	@ApiModelProperty(value = "菜单编号")
	private String code;
	/**
	 * 菜单名称
	 */
	@ApiModelProperty(value = "菜单名称")
	private String name;
	/**
	 * 菜单别名
	 */
	@ApiModelProperty(value = "菜单别名")
	private String alias;
	/**
	 * 请求地址
	 */
	@ApiModelProperty(value = "请求地址")
	private String path;
	/**
	 * 菜单资源
	 */
	@ApiModelProperty(value = "菜单资源")
	private String source;
	/**
	 * 排序
	 */
	@ApiModelProperty(value = "排序")
	private Integer sort;
	/**
	 * 菜单类型
	 */
	@ApiModelProperty(value = "菜单类型")
	private Integer category;
	/**
	 * 操作按钮类型
	 */
	@ApiModelProperty(value = "操作按钮类型")
	private Integer action;
	/**
	 * 是否打开新页面
	 */
	@ApiModelProperty(value = "是否打开新页面")
	private Integer isOpen;
	/**
	 * 组件地址
	 */
	@ApiModelProperty(value = "组件地址")
	private String component;
	/**
	 * 备注
	 */
	@ApiModelProperty(value = "备注")
	private String remark;

	@TableLogic
	@ApiModelProperty("是否已删除")
	private Integer isDeleted;

	/**
	 * 应用id
	 */
	@ApiModelProperty(value = "应用id")
	private String appId;
	/**
	 * 是否为专属应用菜单
	 */
	@ApiModelProperty(value = "是否为专属应用菜单")
	private Integer isExclusive;
	/**
	 * 是否为管理菜单
	 */
	@ApiModelProperty(value = "是否为管理菜单")
	private Integer isManage;
}
